const { defineConfig } = require("@vue/cli-service");
const path = require("path");
function resolve(dir) {
    return path.join(__dirname, dir);
}
const CopyWebpackPlugin = require("copy-webpack-plugin");

module.exports = defineConfig({
    publicPath: "/",
    outputDir: "dist", // 输出文件目录
    assetsDir: "static",
    // 关闭eslint
    lintOnSave: false,
    transpileDependencies: true,
    configureWebpack: {
        resolve: {
            alias: {
                "@": resolve("src"),
            },
        },
        plugins: [
            // 根路径下static复制到dist下的static目录
            new CopyWebpackPlugin([
                {
                    from: resolve("static"),
                    to: "static",
                },
            ]),
        ],
    },
});
